<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let num = prompt("请输入字母a,b,c,d")
      switch (num) {
        case "a":
          alert("春")
          break
        case "b":
          alert("夏")
          break
        case "c":
          alert("秋")
          break
        case "d":
          alert("冬")
          break
        default:
          alert("请输入a,b,c,d这四个关键词")
      }
    </script>
  </body>
</html>
